<template>
  <div class="common-layout">
    <el-container>
      <el-aside width="300px">
<el-row class="tac">
          <el-col :span="12">
      <h5 class="mb-2">学生管理系统</h5>
      <el-menu
        active-text-color="#ffd04b"
        background-color="#545c64"
        class="el-menu-vertical-demo"
        default-active="1"
        text-color="#fff"
        @open="handleOpen"
        @close="handleClose"
        router
      >
      <el-menu-item index="homepage">
          <el-icon><icon-menu /></el-icon>
          <span>首页</span>
        </el-menu-item>
        <el-sub-menu index="">
          <template #title>
            <el-icon><location /></el-icon>
            <span>学生管理</span>
          </template>
          
            <el-menu-item index="studentselect">学生查询</el-menu-item>
            <el-menu-item index="2-2">学生录入</el-menu-item>
          
        </el-sub-menu>
        <el-menu-item index="log">
          <el-icon><icon-menu /></el-icon>
          <span>日志管理</span>
        </el-menu-item>
       
      </el-menu>
    </el-col>
        </el-row>
      </el-aside>
      <el-container>
        <el-header>Header</el-header>
        <el-main>
            <RouterView />
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>
<script lang="ts" setup>
import {
  Document,
  Menu as IconMenu,
  Location,
  Setting,
} from '@element-plus/icons-vue'

const handleOpen = (key: string, keyPath: string[]) => {
  console.log(key, keyPath)
}
const handleClose = (key: string, keyPath: string[]) => {
  console.log(key, keyPath)
}
</script>